package org.example.completed.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.completed.domain.AdoptionCloudRecordDO;
import org.example.completed.mapper.AdoptionCloudRecordMapper;
import org.example.completed.service.AdoptionCloudRecordService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 云领养成功记录表 服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2025-04-15
 */
@Service
public class AdoptionCloudRecordServiceImpl extends ServiceImpl<AdoptionCloudRecordMapper, AdoptionCloudRecordDO> implements AdoptionCloudRecordService {


    @Override
    public boolean updateNewName(String id, String newName) {
        AdoptionCloudRecordDO record = new AdoptionCloudRecordDO();
        record.setId(id);
        record.setNewName(newName);
        int result = baseMapper.updateById(record);
        return result > 0;
    }
}
